package code

import "fmt"

func Funct2() {
	var swap func(x, y int) (int, int)
	swap = func(x, y int) (int, int) {
		return y, x
	}
	call(swap)(20)
}

func call(swap func(x, y int) (int, int)) func(x int) {
	y, _ := swap(10, 20)
	return func(x int) {
		fmt.Println(y + x)
	}
}
